\(\int \sqrt {c (a+b x)^2} \, dx\) [2804]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 25 \[ \int \sqrt {c (a+b x)^2} \, dx=\frac {(a+b x) \sqrt {c (a+b x)^2}}{2 b} \]

[Out]

1/2*(b*x+a)*(c*(b*x+a)^2)^(1/2)/b

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {253, 15, 30} \[ \int \sqrt {c (a+b x)^2} \, dx=\frac {(a+b x) \sqrt {c (a+b x)^2}}{2 b} \]

[In]

Int[Sqrt[c*(a + b*x)^2],x]

[Out]

((a + b*x)*Sqrt[c*(a + b*x)^2])/(2*b)

Rule 15

Int[(u_.)*((a_.)*(x_)^(n_))^(m_), x_Symbol] :> Dist[a^IntPart[m]*((a*x^n)^FracPart[m]/x^(n*FracPart[m])), Int[
u*x^(m*n), x], x] /; FreeQ[{a, m, n}, x] &&  !IntegerQ[m]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 253

Int[((a_.) + (b_.)*(v_)^(n_))^(p_), x_Symbol] :> Dist[1/Coefficient[v, x, 1], Subst[Int[(a + b*x^n)^p, x], x,
v], x] /; FreeQ[{a, b, n, p}, x] && LinearQ[v, x] && NeQ[v, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \sqrt {c x^2} \, dx,x,a+b x\right )}{b} \\ & = \frac {\sqrt {c (a+b x)^2} \text {Subst}(\int x \, dx,x,a+b x)}{b (a+b x)} \\ & = \frac {(a+b x) \sqrt {c (a+b x)^2}}{2 b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.24 \[ \int \sqrt {c (a+b x)^2} \, dx=\frac {c x (a+b x) (2 a+b x)}{2 \sqrt {c (a+b x)^2}} \]

[In]

Integrate[Sqrt[c*(a + b*x)^2],x]

[Out]

(c*x*(a + b*x)*(2*a + b*x))/(2*Sqrt[c*(a + b*x)^2])

Maple [A] (verified)

Time = 3.86 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.16

method result size
gosper \(\frac {x \left (b x +2 a \right ) \sqrt {c \left (b x +a \right )^{2}}}{2 b x +2 a}\) \(29\)
default \(\frac {x \left (b x +2 a \right ) \sqrt {c \left (b x +a \right )^{2}}}{2 b x +2 a}\) \(29\)
trager \(\frac {x \left (b x +2 a \right ) \sqrt {b^{2} c \,x^{2}+2 a b c x +a^{2} c}}{2 b x +2 a}\) \(40\)
risch \(\frac {\sqrt {c \left (b x +a \right )^{2}}\, a x}{b x +a}+\frac {\sqrt {c \left (b x +a \right )^{2}}\, b \,x^{2}}{2 b x +2 a}\) \(47\)

[In]

int((c*(b*x+a)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*x*(b*x+2*a)*(c*(b*x+a)^2)^(1/2)/(b*x+a)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.64 \[ \int \sqrt {c (a+b x)^2} \, dx=\frac {\sqrt {b^{2} c x^{2} + 2 \, a b c x + a^{2} c} {\left (b x^{2} + 2 \, a x\right )}}{2 \, {\left (b x + a\right )}} \]

[In]

integrate((c*(b*x+a)^2)^(1/2),x, algorithm="fricas")

[Out]

1/2*sqrt(b^2*c*x^2 + 2*a*b*c*x + a^2*c)*(b*x^2 + 2*a*x)/(b*x + a)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 71 vs. \(2 (20) = 40\).

Time = 0.45 (sec) , antiderivative size = 71, normalized size of antiderivative = 2.84 \[ \int \sqrt {c (a+b x)^2} \, dx=\begin {cases} \left (\frac {a}{2 b} + \frac {x}{2}\right ) \sqrt {a^{2} c + 2 a b c x + b^{2} c x^{2}} & \text {for}\: b^{2} c \neq 0 \\\frac {\left (a^{2} c + 2 a b c x\right )^{\frac {3}{2}}}{3 a b c} & \text {for}\: a b c \neq 0 \\x \sqrt {a^{2} c} & \text {otherwise} \end {cases} \]

[In]

integrate((c*(b*x+a)**2)**(1/2),x)

[Out]

Piecewise(((a/(2*b) + x/2)*sqrt(a**2*c + 2*a*b*c*x + b**2*c*x**2), Ne(b**2*c, 0)), ((a**2*c + 2*a*b*c*x)**(3/2
)/(3*a*b*c), Ne(a*b*c, 0)), (x*sqrt(a**2*c), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 54 vs. \(2 (21) = 42\).

Time = 0.24 (sec) , antiderivative size = 54, normalized size of antiderivative = 2.16 \[ \int \sqrt {c (a+b x)^2} \, dx=\frac {1}{2} \, \sqrt {b^{2} c x^{2} + 2 \, a b c x + a^{2} c} x + \frac {\sqrt {b^{2} c x^{2} + 2 \, a b c x + a^{2} c} a}{2 \, b} \]

[In]

integrate((c*(b*x+a)^2)^(1/2),x, algorithm="maxima")

[Out]

1/2*sqrt(b^2*c*x^2 + 2*a*b*c*x + a^2*c)*x + 1/2*sqrt(b^2*c*x^2 + 2*a*b*c*x + a^2*c)*a/b

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.44 \[ \int \sqrt {c (a+b x)^2} \, dx=\frac {1}{2} \, {\left ({\left (b x^{2} + 2 \, a x\right )} \mathrm {sgn}\left (b x + a\right ) + \frac {a^{2} \mathrm {sgn}\left (b x + a\right )}{b}\right )} \sqrt {c} \]

[In]

integrate((c*(b*x+a)^2)^(1/2),x, algorithm="giac")

[Out]

1/2*((b*x^2 + 2*a*x)*sgn(b*x + a) + a^2*sgn(b*x + a)/b)*sqrt(c)

Mupad [B] (verification not implemented)

Time = 6.74 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.84 \[ \int \sqrt {c (a+b x)^2} \, dx=\frac {\sqrt {c\,{\left (a+b\,x\right )}^2}\,\left (a+b\,x\right )}{2\,b} \]

[In]

int((c*(a + b*x)^2)^(1/2),x)

[Out]

((c*(a + b*x)^2)^(1/2)*(a + b*x))/(2*b)